package com.osgix.authorize.dao.impl;

import org.springframework.stereotype.Repository;

import com.osgix.authorize.dao.ResourceInfoDao;
import com.osgix.authorize.model.ResourceInfo;
import com.osgix.common.orm.ibatis.AbsEntityDao;

@Repository("resourceInfoDao")
public class ResourceInfoDaoImpl extends AbsEntityDao<ResourceInfo, java.lang.Long> implements ResourceInfoDao {

	@Override
	public String getIbatisMapperNamesapce() {
		return "ResourceInfo";
	}

	public void saveOrUpdate(ResourceInfo resourceInfo) {
		if (resourceInfo.getResourceId() == null)
			save(resourceInfo);
		else
			update(resourceInfo);
	}

}
